import java.util.Locale;
import java.util.Scanner;

public class Class_Practice {
    public static void main(String[] args) {
        String s1 = "abcdef";
        String s2 = " hallo world java ";
        String s3 = "DNF" + "苍龙的力量" + "驱魔天下第一";
        String s4 = "鬼剑士三觉";
        String s5 = "DFGHJKL";

        s4.concat("修罗邪光斩");
        System.out.println(s3.length());
        System.out.println(s1);
        System.out.println(s3);
        String upperCase = s1.toUpperCase();//大小写转换
        String lowerCase = s5.toLowerCase();
        System.out.println(upperCase + lowerCase);
        System.out.println(s2);
        System.out.println(s2.trim());//去除首尾空格
        System.out.println(s2.substring(10));//截取后端字符串
        System.out.println(s2.substring(7,12));//截取中间字符串 取首不取尾
        System.out.println(s2.indexOf("java"));//返回下标地址，找不到返回-1
        System.out.println(s2.indexOf('a'));
        System.out.println(s2.indexOf('b'));
        String s7 = "abcd";
        String s8 = "aBCD";
        //eqoals()比较两个字符串的值是否相等 true  false
        System.out.println(s7.compareTo(s8));//相等返回0 大于正数 小于 负数
        //StringBuffer类对字符的增 删 查 改  处理可变字符串
        //StringBuffer 与 String 的区别
        //String  不可修改  StringBuffer 可修改
        //1.定义一个空的字符缓冲区 含有16个字符的容量  容量会自动扩大
        StringBuffer sb1 = new StringBuffer();
        StringBuffer sb2 = new StringBuffer("浪子剑客给我一刀");
        System.out.println(sb2);
        String str = " 天涯明月刀";
        sb2.append(str);//append（）对StringBuffer 对象中的内容追加
        System.out.println(sb2);
        String str1 = "呀呀呀";
        sb2.insert(4,str1);//insert() 对StringBuffer对象中插入内容
        System.out.println(sb2);
        //reverse() 将字符串序列反转过来
        StringBuffer buffer = new StringBuffer("Hello,");
        buffer.reverse();
        System.out.println(buffer);
        //deleteChaAt() 移除序列中指定位置的字符
        //delete() 移除序列中子字符串的字符
        StringBuffer sub3 = new StringBuffer("How are you");
        sub3.deleteCharAt(5);
        int  b = 10;

        double d= 100;


        System.out.println(b);



    }
}


